import 'package:json_annotation/json_annotation.dart';

part 'dungeon_rank.g.dart';

@JsonSerializable()
class DungeonRank {
  final List<DungeonRankInfo> rankItems;

  DungeonRank({this.rankItems});

  factory DungeonRank.fromJson(Map<String, dynamic> json) =>
      _$DungeonRankFromJson(json);

  Map<String, dynamic> toJson() => _$DungeonRankToJson(this);
}

@JsonSerializable()
class DungeonRankInfo {
  final int userId;
  final String nick;
  final String pic;
  final int level;
  final int score;

  DungeonRankInfo({this.userId, this.nick, this.pic, this.level, this.score});

  factory DungeonRankInfo.fromJson(Map<String, dynamic> json) =>
      _$DungeonRankInfoFromJson(json);

  Map<String, dynamic> toJson() => _$DungeonRankInfoToJson(this);
}
